<div class="pageHeader">
<form id="pagerForm" method="post" action="<?php echo Yii::app()->request->requestUri?>">
	<input type="hidden" name="pageNum" value="1" />
</form>
</div>
<div class="pageContent">
<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="/<?php echo Yii::app()->controller->id?>/add" target="navTab" rel="obj<?php echo $objname?>"><span>添加</span></a></li>
			<li><a class="edit" href="/<?php echo Yii::app()->controller->id?>/edit?id={id}" target="navTab" rel="obj<?php echo $objname?>"><span>修改</span></a></li>
			<li class=""><a class="delete" href="/<?php echo Yii::app()->controller->id?>/delete?id={id}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
		</ul>
	</div>
		<table class="table" layouth="90" width="100%">
			<thead>
				<tr>
					<th width="100">ID</th>
					<th>标题</th>
					<th>缩略图</th>
					<th>发表时间</th>
					<th>访问次数</th>
					<th>分类</th>
					<th>排序（<?php if($this->order == 'DESC'):?>大数在前<?php else:?>大数在后<?php endif;?>）</th>
				</tr>
			</thead>
			<tbody>
			    <?php foreach ($rows as $k => $row):?>
				<tr target="id" rel="<?php echo $row->id?>">
				<td><?php echo $row->id?></td>
				<td><?php echo $row->title?></td>
				<td><?php if($row->thumbnail):?><img height=100 width=100 src="<?php echo $row->thumbnail?>" /><?php else:?>-<?php endif;?></td>
				<td><?php echo $row->create_time?></td>
				<td><?php echo $row->visitd?></td>
				<td><?php foreach($row->rels as $c):?><?php echo $c->cat->name?>,<?php endforeach;?></td>
				<td><?php echo $row->order_id?></td>
				</tr>
				<?php endforeach;?>
			</tbody>
		</table>

		<div class="panelBar">
			<div class="pages">
				<span>共<?php echo $pages->itemCount?>条</span>
			</div>
			
			<div class="pagination" targetType="navTab" totalCount="<?php echo $pages->itemCount?>" numPerPage="<?php echo $pages->pageSize?>" pageNumShown="10" currentPage="<?php echo $pages->currentPage + 1?>"></div>

		</div>
</div>